/************************************************************
 * Filename: LineSegment2D.h
 * Purpose: Basic library for building line segments from
 * vectors.
 * Author: Jeremy Kings
 * Revision: 2 (17 November 2010)
 * Base: LineSegment2D.h - CS529 Project 3
 *
 * Copyright 2010, Digipen Institute of Technology
 ************************************************************/
#pragma once 

#include "Vector2D.h"

	typedef struct LineSegment2D
	{
		Vector2D mP0;		// Point on the line
		Vector2D mP1;		// Point on the line
		Vector2D mN;		// Line's normal
		float mNdotP0;		// To avoid computing it every time it's needed
	}LineSegment2D;

	/*
	This function builds a 2D line segment's data using 2 points
	 - Computes the normal (Unit Vector)
	 - Computes the dot product of the normal with one of the points

	 - Parameters
		- LS:		The to-be-built line segment
		- Point0:	One point on the line
		- Point1:	Another point on the line
	*/
	bool BuildLineSegment2D(LineSegment2D &LS, Vector2D Point0, Vector2D Point1);
